/*
 * @Author: yuluo
 * @Date: 2025-08-28
 * @LastEditors: yuluo
 * @LastEditTime: 2025-09-20
 * @FilePath: \Projecte:\gitee\GD32F427\gd32-f427-BootLoader\User\main.h
 * @Description:
 * 如有特殊注意事项请填写
 * Copyright (c) by ${yuluo}, All Rights Reserved.
 */

#ifndef __MAIN_H
#define __MAIN_H

/******************************************************
 * 串口1调试功能；默认关闭
 * 0：关闭调试
 * 1：打开调试信息
 ******************************************************/
#define USART1_DEBUG_DISABLE 0
#define USART1_DEBUG_ENABLE 1

#define USART1_FUNC USART1_DEBUG_DISABLE /* 串口1是否开启debug功能 */

#define FLASH_BASE_ADDR 0x08000000U       /* flash基地址 */
#define FLASH_APP_ADDR_OFFSET 0x00008000U /* 用户程序存放地址 */
#define FLASH_END_ADDR 0x08100000U        /* flash结束地址 */

#define APP_ADDR (FLASH_BASE_ADDR + FLASH_APP_ADDR_OFFSET) /* 用户程序地址 */

#define Version "Version V1.0.0"              /* BootLoader版本号 */
#define Author "Author Yuluo"                 /* 作者 */
#define Compile_Date "Compile_Date 2025-8-31" /* 编译日期 */
#define Email "yuluo0618@gmail.com"           /* 邮箱 */
#define Chip "Chip:GD32F427ZGT6"              /* 芯片型号 */

#include "sys.h"

#include "app_lcdfont.h"

#include "button.h"
#include "io_lib.h"

#include "stdbool.h"
#include "stdlib.h"
#include "string.h"

#include "crcCheck.h"

#include "delay.h"
#include "usart.h"

#include "drv_timer.h"
#include "drv_chip_flash.h"
#include "drv_lcd.h"
#include "drv_ctiic.h"
#include "drv_gt1151q.h"
#include "drv_touch.h"
#include "drv_key.h"
#include "drv_led.h"

#include "app_timer.h"

void Set_JumpState(uint8_t arg);
void jump_to_app(void);

#endif /* __MAIN_H */
